Skip to content

Make /index command ecosystem-aware with auto-detection#33

Open
robertmclaws wants to merge 2 commits intosupermemoryai:mainfrom
robertmclaws:fix/ecosystem-aware-index-command
Open

Make /index command ecosystem-aware with auto-detection#33
robertmclaws wants to merge 2 commits intosupermemoryai:mainfrom
robertmclaws:fix/ecosystem-aware-index-command

Conversation

@robertmclaws
Copy link

Summary

  • Adds a Phase 0: Detect Ecosystem step that auto-identifies the tech stack by globbing for manifest files before beginning the deep dive
  • Replaces hardcoded JS/TS file names with an Ecosystem Reference table providing per-language guidance across all four indexing phases
  • Adds coverage for 8 ecosystems: .NET/C#, JS/TS, Rust, Python, Go, Java/Kotlin, Ruby, PHP
  • Expands the skip list to include language-specific build output folders (bin, obj, target, vendor, __pycache__, .gradle, build)

The single-command UX is preserved — no arguments needed. The agent detects the stack automatically and uses the reference table to guide what it should look for in each phase.

Problem

The /index command hardcoded ecosystem-specific hints directly into the prompt, creating a tiered experience:

Ecosystem Coverage
JS/TS Good (manifest, entry points, config)
Rust/Python/Go Phase 1 only (manifest name mentioned, nothing else)
.NET/C#, Java, Ruby, PHP Nothing at all

See #32 for the full breakdown.

What Changed

plugin/commands/index.md — Single file, rewritten to be ecosystem-aware:

Section Change
Phase 0 (new) Auto-detect ecosystem via manifest file glob
Ecosystem Reference (new) Four lookup tables covering manifests, entry points, conventions, and key files for 8 ecosystems
Phases 1-4 Now reference the ecosystem table instead of hardcoding file names
Skip list Expanded with language-specific build folders

Test plan

  • Run /index on a JS/TS repo — should still work as before, now with explicit ecosystem detection step
  • Run /index on a .NET/C# repo — should detect *.sln/*.csproj and use .NET-specific guidance
  • Run /index on a Python repo — should detect pyproject.toml and use Python-specific guidance
  • Run /index on a multi-ecosystem repo (e.g., JS frontend + Go backend) — should detect both and explore accordingly

Fixes #32

🤖 Generated with Claude Code

The /index command previously hardcoded JS/TS-specific file names and
entry points, leaving Rust/Python/Go with minimal guidance and
.NET/C#, Java, Ruby, PHP with none at all.

This restructures the command with:
- Phase 0: Auto-detect ecosystem by globbing for manifest files
- Ecosystem Reference table: per-language guidance for manifests,
  entry points, architectural patterns, conventions, and key files
- Coverage for 8 ecosystems: .NET/C#, JS/TS, Rust, Python, Go,
  Java/Kotlin, Ruby, PHP
- Expanded skip list for language-specific build output folders

The single-command UX is preserved (no arguments needed). The agent
detects the stack automatically and uses the reference table to guide
its exploration.

Fixes supermemoryai#32

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@robertmclaws robertmclaws force-pushed the fix/ecosystem-aware-index-command branch from 86cde9c to 0740bf9 Compare February 19, 2026 20:15
Comment on lines -24 to 25
- Identify API routes, database models
- Find entry points per the Ecosystem Reference
- Identify the architectural patterns listed for the detected ecosystem
- Look for API routes/endpoints, database models/entities, and data flow

This comment was marked as outdated.

Phase 0 detected Swift (Package.swift) and Elixir (mix.exs) but the
subsequent reference tables had no entries for them, leaving the agent
with no ecosystem-specific guidance after detection.

Adds complete rows for both ecosystems across all four tables:
- Manifest & Config Files
- Entry Points & Architecture
- Conventions & Patterns
- Key Files to Read

Also adds .build, _build, and deps to the skip list for Swift and
Elixir build output folders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/index command is structurally shallow for all non-JS/TS ecosystems

1 participant